<div>
  <button (click)="codeLogin()">code方式登陆</button>
  <button routerLink="/login">密码方式登陆</button>
  <button *ngIf="auth && auth['user_name']" (click)="logout()">注销</button>
</div>

<div>
  <button routerLink="/public">public</button>
  <button routerLink="/private">private</button>
  <button routerLink="/admin" *ngIf="auth && auth['authorities'] && auth['authorities'].indexOf('admin') > -1">admin
  </button>
</div>

<router-outlet></router-outlet>
